dgb: fenced DGB-side AuxPoW merged-mining coinbase commitment builder (phase DB) - #475
Merged
Conversation
This was referenced Jun 25, 2026
frstrtr
force-pushed
the
dgb/doge-mm-db-commitment
branch
from
June 25, 2026 12:40
2e80314 to
3bb048c
Compare
frstrtr
added a commit
that referenced
this pull request
Jun 25, 2026
…rework) Per integrator adjudication (core builder = MM SSOT): the AuxPoW merged-mining commitment build is a v36-NATIVE SHARED structure, not a per-coin path. The single producer lives in shared A-level scaffolding (c2pool/merged/ merged_mining.cpp + core/coinbase_builder.hpp) and is chain_id-parameterized; DGB/DOGE plug in as chains. A fenced DGB builder that mirrors it is exactly the cross-coin divergence the v36->v37 standardization goal forbids. Drop the duplicate 44-byte build body from src/impl/dgb/coin/ aux_doge_mm_commitment.hpp. dgb::coin::build_aux_mm_commitment is now a thin delegation that forwards verbatim to c2pool::merged::build_auxpow_commitment, keeping a DGB-namespaced entry point with zero DGB-local layout logic. The AUX_MM_MAGIC / AUX_MM_COMMITMENT_SIZE constants remain as reader/KAT pins. aux_doge_mm_commitment_test.cpp keeps its non-circular hand-built fabe6d6d goldens (3 KAT + SizeAndMagic, fully literal hex) AND now asserts each is byte-identical to the core SSOT output (delegation drift-guard), mirroring the NMC auxpow_merkle_test SSOT guard. This pins DGBs chain slot + goldens to the one canonical builder instead of a fenced copy. FENCED / NOT REWIRED: no live caller; mint/work-source path untouched. DB embed-at-mint and DC dual-target wire THROUGH the core builder and are gated on ltc-doge concurrence + operator tap. Both build arms green: 4/4 default and 4/4 -DAUX_DOGE=ON. No CMake/build.yml change (test already links c2pool_merged_mining).
frstrtr
force-pushed
the
dgb/doge-mm-db-commitment
branch
from
June 25, 2026 12:50
3bb048c to
f06ce5b
Compare
This was referenced Jun 25, 2026
frstrtr
added a commit
that referenced
this pull request
Jun 25, 2026
Pure, header-only DC decision contract the eventual DC run-loop wiring (AUX_DOGE node seam + submit) must satisfy, landed BEFORE the seam is touched (seam parked on #82 + ltc-doge written concurrence). coin/aux_dual_target_select.hpp: - aux_mint_decision(aux_enabled, has_doge_job): embed the fabe6d6d MM commitment IFF aux MM enabled AND a DOGE job is present; else no-op (mirrors #486 embed-at-mint nullopt byte-identity). - select_submit(pow, dgb_target, has_doge_job, doge_target): independent per-path thresholds against one scrypt pow_hash (mirrors dc_proof DualTargetIndependentThresholds); DOGE-aux only fires when minted. - selection_is_consistent(): load-bearing DC<->DB guard, fire_doge_aux ==> embed_commitment, coupling submit back to #475/#486. test/aux_dual_target_select_test.cpp: 5/5 KATs, non-circular goldens (fabe6d6d tag, embed truth table, independent threshold table, no-job suppression, the impossible DOGE-win-without-mint state). Registered in test/CMakeLists.txt + both build.yml --target allowlists (#143 trap). Fenced dgb/, not rewired, consumes nothing in src/impl/doge, no node seam touch, zero consensus surface.
frstrtr
added a commit
that referenced
this pull request
Jun 25, 2026
…rework) Per integrator adjudication (core builder = MM SSOT): the AuxPoW merged-mining commitment build is a v36-NATIVE SHARED structure, not a per-coin path. The single producer lives in shared A-level scaffolding (c2pool/merged/ merged_mining.cpp + core/coinbase_builder.hpp) and is chain_id-parameterized; DGB/DOGE plug in as chains. A fenced DGB builder that mirrors it is exactly the cross-coin divergence the v36->v37 standardization goal forbids. Drop the duplicate 44-byte build body from src/impl/dgb/coin/ aux_doge_mm_commitment.hpp. dgb::coin::build_aux_mm_commitment is now a thin delegation that forwards verbatim to c2pool::merged::build_auxpow_commitment, keeping a DGB-namespaced entry point with zero DGB-local layout logic. The AUX_MM_MAGIC / AUX_MM_COMMITMENT_SIZE constants remain as reader/KAT pins. aux_doge_mm_commitment_test.cpp keeps its non-circular hand-built fabe6d6d goldens (3 KAT + SizeAndMagic, fully literal hex) AND now asserts each is byte-identical to the core SSOT output (delegation drift-guard), mirroring the NMC auxpow_merkle_test SSOT guard. This pins DGBs chain slot + goldens to the one canonical builder instead of a fenced copy. FENCED / NOT REWIRED: no live caller; mint/work-source path untouched. DB embed-at-mint and DC dual-target wire THROUGH the core builder and are gated on ltc-doge concurrence + operator tap. Both build arms green: 4/4 default and 4/4 -DAUX_DOGE=ON. No CMake/build.yml change (test already links c2pool_merged_mining).
frstrtr
force-pushed
the
dgb/doge-mm-db-commitment
branch
from
June 25, 2026 15:37
f06ce5b to
172fa23
Compare
…rework) Per integrator adjudication (core builder = MM SSOT): the AuxPoW merged-mining commitment build is a v36-NATIVE SHARED structure, not a per-coin path. The single producer lives in shared A-level scaffolding (c2pool/merged/ merged_mining.cpp + core/coinbase_builder.hpp) and is chain_id-parameterized; DGB/DOGE plug in as chains. A fenced DGB builder that mirrors it is exactly the cross-coin divergence the v36->v37 standardization goal forbids. Drop the duplicate 44-byte build body from src/impl/dgb/coin/ aux_doge_mm_commitment.hpp. dgb::coin::build_aux_mm_commitment is now a thin delegation that forwards verbatim to c2pool::merged::build_auxpow_commitment, keeping a DGB-namespaced entry point with zero DGB-local layout logic. The AUX_MM_MAGIC / AUX_MM_COMMITMENT_SIZE constants remain as reader/KAT pins. aux_doge_mm_commitment_test.cpp keeps its non-circular hand-built fabe6d6d goldens (3 KAT + SizeAndMagic, fully literal hex) AND now asserts each is byte-identical to the core SSOT output (delegation drift-guard), mirroring the NMC auxpow_merkle_test SSOT guard. This pins DGBs chain slot + goldens to the one canonical builder instead of a fenced copy. FENCED / NOT REWIRED: no live caller; mint/work-source path untouched. DB embed-at-mint and DC dual-target wire THROUGH the core builder and are gated on ltc-doge concurrence + operator tap. Both build arms green: 4/4 default and 4/4 -DAUX_DOGE=ON. No CMake/build.yml change (test already links c2pool_merged_mining).
frstrtr
force-pushed
the
dgb/doge-mm-db-commitment
branch
from
June 25, 2026 16:31
172fa23 to
bdfbae7
Compare
frstrtr
added a commit
that referenced
this pull request
Jun 25, 2026
Pure, header-only DC decision contract the eventual DC run-loop wiring (AUX_DOGE node seam + submit) must satisfy, landed BEFORE the seam is touched (seam parked on #82 + ltc-doge written concurrence). coin/aux_dual_target_select.hpp: - aux_mint_decision(aux_enabled, has_doge_job): embed the fabe6d6d MM commitment IFF aux MM enabled AND a DOGE job is present; else no-op (mirrors #486 embed-at-mint nullopt byte-identity). - select_submit(pow, dgb_target, has_doge_job, doge_target): independent per-path thresholds against one scrypt pow_hash (mirrors dc_proof DualTargetIndependentThresholds); DOGE-aux only fires when minted. - selection_is_consistent(): load-bearing DC<->DB guard, fire_doge_aux ==> embed_commitment, coupling submit back to #475/#486. test/aux_dual_target_select_test.cpp: 5/5 KATs, non-circular goldens (fabe6d6d tag, embed truth table, independent threshold table, no-job suppression, the impossible DOGE-win-without-mint state). Registered in test/CMakeLists.txt + both build.yml --target allowlists (#143 trap). Fenced dgb/, not rewired, consumes nothing in src/impl/doge, no node seam touch, zero consensus surface.
frstrtr
added a commit
that referenced
this pull request
Jun 25, 2026
Pure, header-only DC decision contract the eventual DC run-loop wiring (AUX_DOGE node seam + submit) must satisfy, landed BEFORE the seam is touched (seam parked on #82 + ltc-doge written concurrence). coin/aux_dual_target_select.hpp: - aux_mint_decision(aux_enabled, has_doge_job): embed the fabe6d6d MM commitment IFF aux MM enabled AND a DOGE job is present; else no-op (mirrors #486 embed-at-mint nullopt byte-identity). - select_submit(pow, dgb_target, has_doge_job, doge_target): independent per-path thresholds against one scrypt pow_hash (mirrors dc_proof DualTargetIndependentThresholds); DOGE-aux only fires when minted. - selection_is_consistent(): load-bearing DC<->DB guard, fire_doge_aux ==> embed_commitment, coupling submit back to #475/#486. test/aux_dual_target_select_test.cpp: 5/5 KATs, non-circular goldens (fabe6d6d tag, embed truth table, independent threshold table, no-job suppression, the impossible DOGE-win-without-mint state). Registered in test/CMakeLists.txt + both build.yml --target allowlists (#143 trap). Fenced dgb/, not rewired, consumes nothing in src/impl/doge, no node seam touch, zero consensus surface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Adds the first shippable slice of DGB+DOGE merged-mining phase DB: a fenced, header-only DGB-side AuxPoW merged-mining coinbase-commitment builder plus a byte-layout KAT.
src/impl/dgb/coin/aux_doge_mm_commitment.hpp—dgb::coin::build_aux_mm_commitment(aux_merkle_root, merkle_size, merkle_nonce)returns the 44-byte commitment blob in the canonical layout:Mirrors LTC / canonical layout
Byte-identical to the neutral producer
build_auxpow_commitment(src/c2pool/merged/merged_mining.cpp) and to the layout the LTC verify path decodes (src/impl/ltc/share_check.hppverify_merged_coinbase_commitment): the 32-byte aux root is emitted big-endian (reversed from the internal little-endian uint256 word image), and size/nonce are emitted little-endian — exactly the order the verifier reads them back. Emitting in this order is what makes a DGB-as-parent coinbase verifiable by the existing aux machinery with zero byte divergence.KAT is non-circular
src/impl/dgb/test/aux_doge_mm_commitment_test.cpppins the exact bytes for 3 fixed(root, size, nonce)inputs (plus a size/magic structural check). Goldens are hand-constructed from the raw inputs (magic literal + reversed root + manual LE split), not by re-invoking the builder, so the test is a true layout anchor a re-shaped builder cannot self-confirm. Each case additionally pins a fully literal hex image.KAT result: 4/4 PASS in the default arm AND 4/4 PASS in the
-DAUX_DOGEarm.Fenced / NOT rewired
The builder is a pure value transform with no live caller; the work-source / mint path is untouched. Wiring it into coinbase construction is the follow-on DB slice (operator/integrator-gated).
Isolation
Writes only under
src/impl/dgb/(plus the requiredbuild.yml--targetallowlist line — registering the test in both the default and ASan allowlist arms so it is built, not a NOT_BUILT sentinel that reds master, cf. DGB #137/#143). Consumes only dgb/core types (core/uint256.hpp); includes and modifies nothing in the doge/ltc/core/bitcoin_family trees. Flag-agnostic — compiles in the default arm too.NO self-merge
Pushed branch + PR only. Operator/integrator taps the merge.